package fin_enum

import "gitee.com/lailonghui/vehicle-supervision-framework/pkg/dicts"

// 财务-车辆缴费-费用类型
type finVehFeeBillFeeType int

var FinVehFeeBillFeeType finVehFeeBillFeeType

// 缴费
func (c *finVehFeeBillFeeType) Pay() int {
	return 1
}

// 退款
func (c *finVehFeeBillFeeType) ReturnPay() int {
	return 2
}

// 转移缴费
func (c *finVehFeeBillFeeType) TransferPay() int {
	return 3
}

func (c *finVehFeeBillFeeType) ToText(value int) string {
	switch value {

	case 1:
		return "缴费"

	case 2:
		return "退款"

	case 3:
		return "转移缴费"

	}
	return ""
}

func (c *finVehFeeBillFeeType) ToDict(value int) *dicts.IntDict {
	return &dicts.IntDict{
		Text:  c.ToText(value),
		Value: value,
	}
}

func (c *finVehFeeBillFeeType) ToValue(text string) int {
	switch text {

	case "缴费":
		return 1

	case "退款":
		return 2

	case "转移缴费":
		return 3

	}
	return 0
}
